<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jQuery全屏滚动插件演示</title>
    <link rel="stylesheet" href=".//css/fullpage.css">
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        h2{
			margin: 0;
		}
        #fullpage .section{
            text-align: center;
        }
        #fullpage h2{
            font-size: 80px;
            color: white;
        }
        #fp-nav ul li a span, .fp-slidesNav ul li a span {
            background: white;
        }
        .fp-controlArrow.fp-prev {
            left: 50px;
        }
        .fp-controlArrow.fp-next {
            right: 50px;
        }
        #menu{
            /* right: 0; */
            width: 100%;
            position: fixed; 
            z-index: 1024;
            top: 0;
        }
        #menu ul {
            /* float: right; */
            overflow: hidden;
        }
        #menu li{
            float: left;
            margin: 0 15px;
        }
        #menu a{
            font-size: 18px;
            color: white;
            text-decoration: none;
            line-height: 40px;
        }
        #menu li.active a{
            font-weight: bold;
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <ul id="menu">
        <li data-menunanchor="first" class="active"><a href="#first">第一屏</a></li>
        <li data-menunanchor="second"><a href="#second">第二屏</a></li>
        <li data-menunanchor="third"><a href="#third">第三屏</a></li>
        <li data-menunanchor="fourth"><a href="#fourth">第四屏</a></li>
    </ul>
    <div id="fullpage">
        <div class="section">
            <h2>第一页</h2>
        </div>
        <div class="section">
            <h2>第二页</h2>
        </div>
        <div class="section">
            <h2>第三页</h2>
            <div class="slide">
                <h2>第一屏</h2>
            </div>
            <div class="slide">
                <h2>第二屏</h2>
            </div>
            <div class="slide">
                <h2>第三屏</h2>
            </div>
        </div>
        <div class="section">
            <h2>第四页</h2>
        </div>
    </div>


   
    <script src="./js/jquery-3.6.0.js"></script>
    <script src="./js/fullpage.js"></script>
    <script>
        $('#fullpage').fullpage({
            sectionsColor:['rgb(254, 67, 101)', 'rgb(252, 157, 154)', 'rgb(249, 205, 173)', 'rgb(200, 200, 169)'],
            navigation:true,
            navigationTooltips:['第一屏', '第二屏', '第三屏', '第四屏'],
            anchors:['first','second','third','fourth'],
            menu:'#menu'
        })
    </script>
</body>
</html>